package com.party.core.dao.write.mall;

import com.party.core.dao.write.BaseWriteDao;
import com.party.core.model.mall.MallGoods;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * Created by wei.li
 *
 * @date 2017/8/15 0015
 * @time 15:56
 */

@Repository
public interface MallGoodsWriteDao extends BaseWriteDao<MallGoods> {
    /**
     * 清除开售时间
     *
     * @param id 商品id
     */
    void clearStartTime(String id);

    /**
     * 更新状态为已售罄
     *
     * @param id     商品id
     * @param status 状态
     */
    void updateStatus(@Param(value = "id") String id, @Param(value = "status") Integer status);

    /**
     * 更新库存
     *
     * @param id    商品id
     * @param stock 库存
     */
    void updateStock(@Param(value = "id") String id, @Param(value = "stock") Long stock);
}
